﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="TrangThaiSanPham.aspx.cs" Inherits="TrangThaiSanPham" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="ThemSP">
        <table>
            <tr>
                <td colspan="2">Online<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="AccessDataSource1" DataTextField="TenSP" DataValueField="MaSP"></asp:DropDownList>
                    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT TenSP, MaSP FROM SanPham WHERE (KN &lt;&gt; - 1)"></asp:AccessDataSource>
                    &nbsp;<asp:Button ID="Online" runat="server" Text="Online" OnClick="Online_Click" CssClass="myButton" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   Offline
                    <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="AccessDataSource2" DataTextField="TenSP" DataValueField="MaSP"></asp:DropDownList>
                    <asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT MaSP, TenSP FROM SanPham WHERE (KN = - 1)"></asp:AccessDataSource>
                    <asp:Button ID="Offline" runat="server" Text="Offline" OnClick="Offline_Click" CssClass="myButton" />
                    <br />
                    <br />
                    <div id="XoaThem" runat="server">
                        <asp:Button ID="Xoa" runat="server" Text="Xóa Khỏi Danh Sách Bán" OnClick="Xoa_Click" CssClass="myButton" />&nbsp;&nbsp;
                    <asp:Button ID="them" runat="server" Text="Thêm vào Danh Sách Bán" OnClick="them_Click" CssClass="myButton" />&nbsp;&nbsp;
                     <asp:Button ID="Sua" runat="server" Text="Sửa Thông Tin Sản Phẩm" OnClick="Sua_Click" CssClass="myButton" />
                        <br />
                        <a href="TrangThaiSanPham.aspx">
                            <asp:Label ID="thongbao" runat="server" Text=" "></asp:Label></a>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div id="Xem" runat="server">
                        <table>
                            <asp:DataList ID="Data1" runat="server" DataKeyField="MaSP" DataSourceID="AccessDataSource3">
                                <ItemTemplate>
                                    <tr>
                                        <td valign="top" class="CTSP-td">
                                            <asp:Image ID="Image1" runat="server" Height="190px" ImageUrl='<%# Eval("Hinh", "{0}") %>' Width="190px" />
                                            <br />
                                            Mã sản phẩm:
                            <asp:Label ID="MaSPLabel" runat="server" Text='<%# Eval("MaSP") %>' />
                                            <br />
                                            Tên sản phẩm:
                            <asp:Label ID="TenSPLabel" runat="server" Text='<%# Eval("TenSP") %>' />
                                            <br />
                                            Hãng sản xuất:
                            <asp:Label ID="HangSXLabel" runat="server" Text='<%# Eval("HangSX") %>' />
                                            <br />
                                            Ngày nhập:
                            <asp:Label ID="NgayNhapLabel" runat="server" Text='<%# Eval("NgayNhap") %>' />
                                            <br />
                                            Ngày giới thiệu:
                            <asp:Label ID="NgayGioiThieuLabel" runat="server" Text='<%# Eval("NgayGioiThieu") %>' />
                                            <br />
                                            Tình trạng:
                            <asp:Label ID="TinhTrangLabel" runat="server" Text='<%# Eval("TinhTrang") %>' />
                                            <br />

                                            <br />
                                            Giá:
                            <asp:Label ID="GiaLabel" runat="server" Text='<%# Eval("Gia") %>' />
                          
                                            <br />
                                            Kích thước:
                            <asp:Label ID="KichThuocLabel" runat="server" Text='<%# Eval("KichThuoc") %>' />
                                            <br />


                                            Khả năng :
                            <asp:Label ID="KNLabel" runat="server" Text='<%# Eval("KN") %>' />
                                            <br />
                                        </td>
                                        <td class="CTSP-detail">
                                            <asp:Image ID="Image2" runat="server" Height="400px" ImageUrl='<%# Eval("HinhAnh", "{0}") %>' Width="600px" />
                                            <br />


                                            <asp:Label ID="ChiTietLabel" runat="server" Text='<%# Eval("ChiTiet") %>' />
                                            <br />
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:AccessDataSource ID="AccessDataSource3" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT * FROM [SanPham] WHERE ([MaSP] = ?)">
                                <SelectParameters>
                                    <asp:QueryStringParameter Name="MaSP" QueryStringField="MaSP" Type="String" />
                                </SelectParameters>
                            </asp:AccessDataSource>
                        </table>
                    </div>
                    <div id="Suaa" runat="server">
                        <table>
                            <tr>
                                <td style="height: 26px">Mã Sản Phẩm</td>
                                <td style="height: 26px">
                                    <asp:TextBox ID="txtMaSPS" runat="server" Width="189px" ReadOnly="True"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                        ErrorMessage="Nhập mã sản phẩm" ControlToValidate="txtMaSPS" Font-Size="12px"
                                        ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                        ErrorMessage="Mã sản phẩm không đúng XX-00" ControlToValidate="txtMaSPS"
                                        ValidationExpression="[A-Z]{2}-[0-9]{2}" Font-Size="12px" ForeColor="Red"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>Tên Sản Phẩm</td>
                                <td>
                                    <asp:TextBox ID="txtTenSPS" runat="server" Width="190px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Nhập tên sản phẩm" ControlToValidate="txtTenSPS" Font-Size="12px" ForeColor="Red"></asp:RequiredFieldValidator>
                                </td>

                            </tr>
                            <tr>
                                <td>Hãng Sản Xuất</td>
                                <td>
                                    <asp:TextBox ID="txtHangSAnXuats" runat="server" Width="190px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Nhập hãng sản xuất" ControlToValidate="txtHangSAnXuats" Font-Size="12px" ForeColor="Red"></asp:RequiredFieldValidator>
                                </td>

                            </tr>
                            <tr>
                                <td>Ngày Giới Thiệu</td>
                                <td>
                                    <asp:DropDownList ID="Ngay" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="Thang" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="Nam" runat="server">
                                    </asp:DropDownList>

                                </td>

                            </tr>
                            <tr>
                                <td>Tình Trạng </td>
                                <td>
                                    <asp:TextBox ID="txtTinhTrangSuas" runat="server" Width="190px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Nhập tình trạng sản phẩm" ControlToValidate="txtTinhTrangSuas" Font-Size="12px" ForeColor="Red"></asp:RequiredFieldValidator>
                                </td>

                            </tr>
                            <tr>
                                <td>Giá </td>
                                <td>
                                    <asp:TextBox ID="txtGias" runat="server" Width="190px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Nhập giá sản phẩm" ControlToValidate="txtGias" Font-Size="12px" ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
                                        ErrorMessage="Giá chỉ nhập số" ControlToValidate="txtGias"
                                        ValidationExpression="^\d+$" Font-Size="12px" ForeColor="Red"></asp:RegularExpressionValidator>
                                </td>

                            </tr>             
                            <tr>
                                <td>Kích Thước </td>
                                <td>
                                    <asp:TextBox ID="txtkichthuoc" runat="server" Width="190px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="Nhập kích thước sản phẩm" ControlToValidate="txtkichthuoc" Font-Size="12px" ForeColor="Red"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>Hình</td>
                                <td>
                                    <asp:FileUpload ID="FileUpload2" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td>Hình Minh Họa</td>
                                <td>
                                    <asp:FileUpload ID="FileUpload3" runat="server" />

                                </td>
                                <tr>
                                    <td>Khả Năng</td>
                                    <td>

                                        <asp:DropDownList ID="DropDownList3" runat="server">
                                            <asp:ListItem Value="Chon">Chọn </asp:ListItem>
                                            <asp:ListItem Value="-1">-1</asp:ListItem>
                                            <asp:ListItem Value="1">1</asp:ListItem>
                                            <asp:ListItem Value="2">2</asp:ListItem>
                                            <asp:ListItem Value="3">3</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>





                                </tr>
                        </table>
                        <CKEditor:CKEditorControl ID="CKEditorControl1" runat="server" Height="450px"></CKEditor:CKEditorControl>
                        <asp:Button ID="ThayDoi" runat="server" Text="Thay Đổi" OnClick="ThayDoi_Click" CssClass="myButton" />
                        <asp:Label ID="Label2" runat="server" Text=" "></asp:Label>
                        <asp:Button ID="BtnXem" runat="server" Text="Xem" OnClick="BtnXem_Click" CssClass="myButton" />
                    </div>

                </td>
            </tr>
        </table>
    </div>
</asp:Content>

